﻿using System;

namespace GenericExample
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            User<int,int> user1 = new User<int,int>();
            user1.RegistrationStatus = 1234;
            user1.Age = 23;

            User<bool,int> user2 = new User<bool,int>();
            user2.RegistrationStatus = true;
            user2.Age = 34;
            
            Console.WriteLine(user1.RegistrationStatus);
            Console.WriteLine(user2.RegistrationStatus);

            // create object of generic class
            MarksPrinter<GraduateStudent> mp = new MarksPrinter<GraduateStudent>();
            mp.stu = new GraduateStudent() { Marks = 80 };
            mp.PritnMarks();
            

            // generic method
            Sample sample = new Sample();
            Employee emp = new Employee() { Salary = 100 };

            sample.PrintData<Employee>(emp);
            
            Console.ReadKey();
        }
    }
}